<?php /* Smarty version 2.6.16, created on 2012-09-30 07:19:03
         compiled from training_partner_game.tpl */ ?>
<div id="paging">

	<div align="right">
		<?php if ($this->_tpl_vars['is_coach'] == '0'): ?>
		<!--label>Become a Coach :</label> <input type="radio" name="user_type" value="1" onclick="coach_game()" /-->
		<a class="button" href="coach_game_update.php?profile=Y"><span>Become a Coach</span></a>
		<?php endif; ?>
		<?php if ($this->_tpl_vars['is_partner'] == '0'): ?>
		<a class="button" href="training_partner_game_update.php?profile=Y">Become Training Partner</a>
		<!--label>Become a Training Partner :</label> <input type="radio" name="user_type" value="3" onclick="tp_game()"/-->
		<?php endif; ?> 
	</div>
	<div class="content">
			
						<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => 'user_tabs.tpl', 'smarty_include_vars' => array('active_tab' => 'training partner')));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
						
			<div class="clear"></div>
			<div class="tabular-content"> 
				<div class="total-message">
					<a href="training_partner_game_update.php" class="button">Add Game</a>&nbsp;
					<strong>Total Games : <?php echo $this->_tpl_vars['Numcoachgame']; ?>
</strong>&nbsp;&nbsp;
				</div> 
				<div class="clear"></div>                     
				<div>
					<?php if ($this->_tpl_vars['Numcoachgame'] > 0): ?>
						<?php unset($this->_sections['gameRow']);
$this->_sections['gameRow']['name'] = 'gameRow';
$this->_sections['gameRow']['loop'] = is_array($_loop=$this->_tpl_vars['TpgameArr']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['gameRow']['show'] = true;
$this->_sections['gameRow']['max'] = $this->_sections['gameRow']['loop'];
$this->_sections['gameRow']['step'] = 1;
$this->_sections['gameRow']['start'] = $this->_sections['gameRow']['step'] > 0 ? 0 : $this->_sections['gameRow']['loop']-1;
if ($this->_sections['gameRow']['show']) {
    $this->_sections['gameRow']['total'] = $this->_sections['gameRow']['loop'];
    if ($this->_sections['gameRow']['total'] == 0)
        $this->_sections['gameRow']['show'] = false;
} else
    $this->_sections['gameRow']['total'] = 0;
if ($this->_sections['gameRow']['show']):

            for ($this->_sections['gameRow']['index'] = $this->_sections['gameRow']['start'], $this->_sections['gameRow']['iteration'] = 1;
                 $this->_sections['gameRow']['iteration'] <= $this->_sections['gameRow']['total'];
                 $this->_sections['gameRow']['index'] += $this->_sections['gameRow']['step'], $this->_sections['gameRow']['iteration']++):
$this->_sections['gameRow']['rownum'] = $this->_sections['gameRow']['iteration'];
$this->_sections['gameRow']['index_prev'] = $this->_sections['gameRow']['index'] - $this->_sections['gameRow']['step'];
$this->_sections['gameRow']['index_next'] = $this->_sections['gameRow']['index'] + $this->_sections['gameRow']['step'];
$this->_sections['gameRow']['first']      = ($this->_sections['gameRow']['iteration'] == 1);
$this->_sections['gameRow']['last']       = ($this->_sections['gameRow']['iteration'] == $this->_sections['gameRow']['total']);
?>
							<div class="profile-list" <?php if ($this->_sections['gameRow']['index']%2 != 0): ?>style="background-color:#f2f2f2;"<?php endif; ?>>
								<div class="game-details" <?php if ($this->_sections['gameRow']['index']%2 != 0): ?>style="background-color:#f2f2f2;"<?php endif; ?> >
									<h4><?php echo $this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['game']; ?>
</h4>
									<ul class="games-desc" style="padding-top:0px;">
										<?php if ($this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['is_ladder'] == 'Y'): ?>
											<li><span>Ladder :</span> <?php if ($this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['ladder'] != ''):  echo $this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['ladder'];  else: ?>N/A<?php endif; ?></li>
										<?php endif; ?>
										<?php if ($this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['is_server'] == 'Y'): ?>
											<li><span>Server :</span> <?php if ($this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['server']):  echo $this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['server'];  else: ?>N/A<?php endif; ?> </li>
										<?php endif; ?>
										<?php if ($this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['is_region'] == 'Y'): ?>
											<li><span>Region :</span> <?php if ($this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['region']):  echo $this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['region'];  else: ?>N/A<?php endif; ?> </li>
										<?php endif; ?>
									</ul>
									<ul class="games-desc" style="padding-top:0px;">
										<?php if ($this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['is_race'] == 'Y'): ?>
											<li><span>Race :</span> <?php if ($this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['race'] != ''):  echo $this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['race'];  else: ?>N/A<?php endif; ?></li>
										<?php endif; ?>
										<?php if ($this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['is_rating'] == 'Y'): ?>
											<li><span>Rating :</span> <?php if ($this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['rating']):  echo $this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['rating'];  else: ?>N/A<?php endif; ?> </li>
										<?php else: ?>
											<li>&nbsp;</li>
										<?php endif; ?>
									</ul>
									<p class="clear"></p>
									<p style="padding-top:5px;">
										<b>Experience : </b>
											<?php if ($this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['experience'] != ''): ?>
												<?php echo $this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['experience']; ?>

											<?php else: ?>
												N/A
											<?php endif; ?>
									</p>
									<p class="clear"></p>
									<div style="height:10px;"></div>
									<div class="clear"></div>
									<div style="width:100%; padding-left:150px;">
										<div class="view">
											<a class="button" href="#" onclick="ConfirmDelete('<?php echo $this->_tpl_vars['page_name']; ?>
?action=del','<?php echo $this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['user_game_id']; ?>
','<?php echo $this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['game']; ?>
','Your selected game:: ')">
												Delete
											</a>
										</div>
										<div class="view" style="margin-right:5px;">
											<a class="button" href="training_partner_game_update.php?user_game_id=<?php echo $this->_tpl_vars['TpgameArr'][$this->_sections['gameRow']['index']]['user_game_id']; ?>
">
												Edit
											</a>
										</div>
									</div>
								</div>
								<div class="clear"></div>
							</div>
						<?php endfor; endif; ?>
					<?php else: ?>
						<div class="profile-list">
							<div class="game-details"> No game found </div>
						</div>
					<?php endif; ?>
					<div class="clear"></div>
				</div>
			</div>
	</div>
</div>     